/*********************************************************************************************
 *
 *				Function to check is int or not 											 *
 *
 ********************************************************************************************/



#include "mystrings.h"

int is_int (char *s){						      /* s - char having the string */
	long long num = 0 ;
	int sign = 0 ;									/* store the sign */

	sign = ( *s == '-') ? -1:1 ;				
	if (*s == '+' || *s == '-' )
		s++ ;

	for (num = 0; (*s >= '0') && (*s <= '9') ;s++){
		num = num*10 + (*s -'0');
	}
	//	printf (" sigh = %d \n",sign);
	num *= sign;
	//		printf (" lonfag =%lld \n",num);
	if ( num <= INT_MAX && num >= 0){

		return 1;
	}

	return 0;

}



